import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/Home.vue')
  },  {
    path: '/register',
    name: 'Register',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/register.vue')
  }, {
    path: '/login',
    name: 'Login',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/login.vue')
  }, {
    path: '/person',
    name: 'Person',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/person.vue')
  }, {
    path: '/rent',
    name: 'Rent',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/rent.vue')
  },
  {
    path: '/about',
    name: 'About',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/about.vue')
  }, {
    path: '/house',
    name: 'House',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/house.vue')
  },{
        path: '/suggest',
        name: 'Suggest',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/suggest.vue')
    },{
        path: '/houseDetail',
        name: 'HouseDetail',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/houseDetail.vue')
    },  {
        path: '/present',
        name: 'Present',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/present.vue')
    }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
